package com.jinduplan.planmanager.bean;

import java.util.List;
import java.util.Objects;

public class RequestPutProjectBean {


    private String completion_date;
    private int project_id;
    private List<UserArrBean> user_arr;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RequestPutProjectBean that = (RequestPutProjectBean) o;
        return getProject_id() == that.getProject_id() && Objects.equals(getCompletion_date(), that.getCompletion_date()) && Objects.equals(getUser_arr(), that.getUser_arr());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getCompletion_date(), getProject_id(), getUser_arr());
    }

    public String getCompletion_date() {
        return completion_date;
    }

    public void setCompletion_date(String completion_date) {
        this.completion_date = completion_date;
    }

    public int getProject_id() {
        return project_id;
    }

    public void setProject_id(int project_id) {
        this.project_id = project_id;
    }

    public List<UserArrBean> getUser_arr() {
        return user_arr;
    }

    public void setUser_arr(List<UserArrBean> user_arr) {
        this.user_arr = user_arr;
    }

    public static class UserArrBean {
        private int labour_id;
        private List<ConstructionArrBean> construction_arr;

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            UserArrBean that = (UserArrBean) o;
            return getUser_id() == that.getUser_id() && Objects.equals(getConstruction_arr(), that.getConstruction_arr());
        }

        @Override
        public int hashCode() {
            return Objects.hash(getUser_id(), getConstruction_arr());
        }

        public int getUser_id() {
            return labour_id;
        }

        public void setUser_id(int labour_id) {
            this.labour_id = labour_id;
        }

        public List<ConstructionArrBean> getConstruction_arr() {
            return construction_arr;
        }

        public void setConstruction_arr(List<ConstructionArrBean> construction_arr) {
            this.construction_arr = construction_arr;
        }

        public static class ConstructionArrBean {
            private int construction_id;
            private float completion_area;
            private String usage_amount;

            @Override
            public boolean equals(Object o) {
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;
                ConstructionArrBean that = (ConstructionArrBean) o;
                return getConstruction_id() == that.getConstruction_id() && Float.compare(that.getCompletion_area(), getCompletion_area()) == 0 && Objects.equals(getUsage_amount(), that.getUsage_amount());
            }

            @Override
            public int hashCode() {
                return Objects.hash(getConstruction_id(), getCompletion_area(), getUsage_amount());
            }

            public int getConstruction_id() {
                return construction_id;
            }

            public void setConstruction_id(int construction_id) {
                this.construction_id = construction_id;
            }

            public float getCompletion_area() {
                return completion_area;
            }

            public void setCompletion_area(float completion_area) {
                this.completion_area = completion_area;
            }

            public String getUsage_amount() {
                return usage_amount;
            }

            public void setUsage_amount(String usage_amount) {
                this.usage_amount = usage_amount;
            }
        }
    }
}
